<template>
  <tab>
    <tab-item v-for="(item, index) in tabItem" :key="index" :selected="index == 0" @on-item-click="handler">{{ item }}</tab-item>
  </tab>
</template>

<script>
import { Tab, TabItem } from 'vux';
export default {
  props: {
    tabItem: Array
  },
  components: {
    Tab,
    TabItem
  },
  data() {
    return {};
  },
  methods: {
    handler(e) {
      this.$emit('tabClick', e);
    }
  }
};
</script>

<style></style>
